package com.itcast.clientx.util;

import org.springframework.stereotype.Component;

@Component
public class TextUtil {
    /**
     * 截取文件名称的后缀名称,包含.
     * @param text
     * @return
     */
    public String suffix(String text){
        int last = text.lastIndexOf(".");
        text = text.substring(last);
        return text;
    }

    /**
     * 判断是否完全存在
     * @param text
     * @return
     */
    public Boolean notnull(String text) {
        return text != null && text.trim() != "";
    }
}
